package com.galudisu.handsonic.base;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.persistence.PostPersist;
import javax.persistence.PostRemove;
import javax.persistence.PostUpdate;

/**
 * @author Barudisshu
 */
public class LoggingTableListener<T extends AudiTableEntity> {

    public static final Logger logger = LoggerFactory.getLogger(LoggingTableListener.class);

    @PostRemove
    @PostUpdate
    @PostPersist
    void postPersist(T t) {
        logger.info(t.getClass() + " has been modify");
    }
}
